package cn.edu.nit.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * @Author xiaobai
 * @Date 2022/9/17 15:08
 * @Version 1.0.0
 */
@Data
@TableName("sys_teacher")
public class Teacher {

    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private String sex;
    private String birth;
    private String phone;
    private String email;
    private String dept;
    private String position;
    private Integer stateId;
    private String stateName;
    private String joinUs;
    private String time;

    public String getStateName() {
        if("0".equals(stateId)) {
            return "待激活";
        }else if("1".equals(stateId)) {
            return "正常";
        }else if("2".equals(stateId)) {
            return "请假";
        }
        return "待激活";
    }

    public void setStateName(String stateName) {
        this.stateName = stateName;
    }
}
